package com.single.weblearn.web.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.single.weblearn.dao.AccountDao;
import com.single.weblearn.meta.Account;

@Controller
public class AccountController {
	@Autowired
	private AccountDao dao;

	@RequestMapping(value = "/account", method = RequestMethod.GET)
	public String process(ModelMap map) {
		List<Account> buyList = dao.getbuylist();
		map.addAttribute("buyList", buyList);
		return "account";

	}
}
